package com.cems.mapper;


import com.cems.pojo.CommentReply;
import com.cems.pojo.ForumArticle;
import com.cems.pojo.ForumComment;
import com.cems.pojo.ForumCommentBig;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * @InterfaceName ForumMapper
 * @Author 陈新予(blank)
 * @Date 2021/5/18
 * @Version 1.0
 */
@Mapper
@Component
public interface ForumMapper {
    List<ForumArticle> getAllArticle();

    List<ForumComment> getAllComment();

    List<CommentReply> getAllReply();

    List<CommentReply> getReplyByComment(int id);

    void updateArticle(@Param("id") int id, @Param("status") String status);

    void delReply(int id);

    void addForum(Map<String, Object> map);

    List<ForumArticle> getAllArticle2();

    ForumArticle getArticleById(int id);

    List<ForumCommentBig> getCommentByArt(int id);

    void addComment(Map<String, String> map);

    void addReply(Map<String, String> map);

    List<ForumArticle> selArticleByUId(int userId);
    ForumArticle  selArticleById(int id);

    int delArticeById(int id);

    int delCommentById(Map<String,Object> map);

    List<ForumComment> selForCommentById(int artId);
    List<ForumArticle> selDelArticleByUId(int artId);
}
